|
|
On Tuesday 30 November 2004 23:02, Boyd Stephen Smith Jr. wrote:
> On Tuesday 30 November 2004 07:28 am, Jason Stubbs <jstubbs@xxxxxxxxxx>
> > On Tuesday 30 November 2004 07:39, Boyd Stephen Smith Jr. wrote:
> > > During calculating dependencies, emerge is smart emough not to install
> > > a package twice, so it's already ¨collapsing" dependencies. If I
> > > emerge XXX YYY and both XXX and YYY need virtual/baz, I don't get
> > > virtual/baz installed twice.
> >
> > This is not true. Portage is not that smart, yet. Try creating the
> > following three ebuilds:
> >
> > foo-1.0:SLOT="0"
> > foo-2.0:SLOT="0"
> > bar-1.0:DEPEND="<foo-2 >=foo-2"
> >
> > "emerge bar" will then happily go and merge both foo and bar at the same
> > time.
>
> I suppose you mean that it will install both foo-1 and foo-2?
Yep.
> Of course, with rules like *that* I'd actually expect some kind of error.
> Since, foo-1 and foo-2 share the same slot but bar needs both of them.
An error is what it should be. It'll happen at the same time that
upgrade/downgrade loops are handled properly.
> Of course, I was a little bit generous in my critque of portage. It will
> do some "stupid" stuff. I believe if you are emerging something that
> provides a virtual but is not the default provider for that virtual in
> your profile and something that depends on that same virtual it will
> attempt to install both the default provider and the provider you
> specified.
Yep. This should be completely fixed now with the release of 2.0.51-r5. I
thought it was fixed before the initial release of 2.0.51 but, alas, there
was still one function not taking notice.
> What I meant is if I emerge foo bar and bar depends on foo it won't install
> foo twice. Although, it might if bar has a <foo-x.y dependency; I haven't
> tried.
As it stands now, portage pretty much looks at all the deps sequentially. If a
package is installed or in the graph that satisfies the atom, it skips to the
next dep. Otherwise it selects a package and adds it to the graph.
It is for this reason that "emerge =apache-1* mod_php" will install only
apache-1 where "emerge mod_php =apache-1*" will install both apache-1 and
apache-2.
> That's cool. I know it's a non-trivial fix, I just wanted to call
> attention to it. I would work on it, but 1) I don't really have the time
> 2) I don't know python.
I'll accept #1 but not #2. ;)
> > > I agree that it is not a minor upgrade, but with portage limiting
> > > dependencies to < <= = >= > and logical || and && it's a reasonable
> > > task.
> >
> > && is not implemented yet, but will be. There's also others on the way
> > that make it a fair bit more complicated:
>
> Well, it is implicitly, since you can depend on multiple things and all
> those dependencies must be satisfied.
&& ( >=foo/bar-1.2 <=foo/bar-1.5 )
Not of the highest priority, but it does have some use.
> > You're right though. It's not impossible and an expert system seems to
> > be the most expedient way. We're still about 6 months away though..
>
> No hurries. Gentoo is far from stagnant and I don't want the devs to burn
> out.
I'm glad some people understand. :)
Regards,
Jason Stubbs
--
gentoo-user@xxxxxxxxxx mailing list
|
|